/*
 * @Description: 你的代码我的心
 * @Author: GGB
 * @Date: 2021-12-27 09:34:45
 * @LastEditors: GGB
 * @LastEditTime: 2022-01-04 09:04:36
 */

import {
  ExpressPageParms,
  ExpressListGetResultModel,
  UpdateStoreInfoParams,
} from './model/storeModel';
import { defHttp } from '/@/utils/http/axios';

import { BasicResult } from '../model/baseModel';

enum Api {
  StroeInfo = '/store/info',
  UpdateStoreInfo = '/store/update',
  StoreExpress = '/setting.express/list',
}
/**
 * 获取物流列表
 */
export const getStoreExpressList = (params: ExpressPageParms) =>
  defHttp.get<ExpressListGetResultModel>({ url: Api.StoreExpress, params });

/**
 * 获取门店详情
 * @param params
 * @returns
 */
export const storeDetail = () => defHttp.get<BasicResult>({ url: Api.StroeInfo });

/**
 * 更新子门店信息
 */
export const updateStoreInfo = (params: UpdateStoreInfoParams) =>
  defHttp.post<BasicResult>({ url: Api.UpdateStoreInfo, params });
